import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { TestPService } from './test-p.service';
import { CreateTestPDto } from './dto/create-test-p.dto';
import { UpdateTestPDto } from './dto/update-test-p.dto';

@Controller('test-p')
export class TestPController {
  constructor(private readonly testPService: TestPService) {}

  @Post()
  create(@Body() createTestPDto: CreateTestPDto) {
    return this.testPService.create(createTestPDto);
  }

  @Get()
  findAll() {
    return this.testPService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.testPService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateTestPDto: UpdateTestPDto) {
    return this.testPService.update(+id, updateTestPDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.testPService.remove(+id);
  }
}
